const express = require('express');
const router = express.Router();
const gradeController = require('../../controllers/grade.controller');
const authMiddleware = require('../../middlewares/auth');

// 获取学生成绩概览
router.get('/grades', 
  authMiddleware('student'),
  gradeController.getStudentGrades
);

// 获取课程详细成绩
/*router.get('/grades/:courseId', 
  authMiddleware('student'),
  gradeController.getCourseGradeDetail
);*/

// 开发环境专用路由
if (process.env.NODE_ENV === 'development') {
  router.post('/grades/mock', 
    authMiddleware('admin'),
    gradeController.createMockGrades
  );
}

module.exports = router;